
#pragma once


#include <d3d9.h>
#include <d3dx9.h>



#define KEYDOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0)
#define KEYUP(vk_code)   ((GetAsyncKeyState(vk_code) & 0x8000) ? 0 : 1)




enum TriangleCell{
	UPPER,
	LOWER
};



enum BoundingType{
	BoundingType_Box,
	BoundingType_Sphere
};




struct BoundingBox
{
	//	BoundingBox();

	//	bool isPointInside(D3DXVECTOR3& p);
	D3DXVECTOR3 _min;
	D3DXVECTOR3 _max;

};

struct BoundingSphere
{
	//BoundingSphere();

	D3DXVECTOR3 _center;
	float       _radius;
};

struct Ray
{
	D3DXVECTOR3 origin;
	D3DXVECTOR3 dir;
};



